OperatorA CASEcan do it. You can add a where clause so that the system does not evaluate each record and improve performance if the MCID is indexed.
UPDATE tblmaincircle set mcname = case when mcid = 'M1' then 'McNameM1'
when mcid = 'M2' then 'McNameM2'
when mcid = 'M3' then 'McNameM3'
when mcid = 'M4' then 'McNameM4'
when mcid = 'M5' then 'McNameM5' end
where mcid in ('M1','M2','M3','M4','M5');
source
share