i want to do it using case when statement......but my code isnt working......want correction i am writing it on sql server express edition,,,,,plz reply with correct sql query and reason for why my code is wrong...
MY CODE IS :-
update originals set LOYAL_TO = case when last_name = 'Mikelson'
then LOYAL_TO = 'KLAUS'
when first_name = 'KOL' then LOYAL_TO = 'NO ONE'
when first_name = 'DAVINA' then LOyal_to = 'MARCEL'
when first_name = 'camille' then loyal_to = 'MARCEL'
when first_name = 'vincent' then loyal_to = 'EVERYONE'
when first_name = 'josh' then loyal_to = 'MARCEL'
when FIRST_NAME = 'JACKSON' then loyal_to = 'HAYLEY'
when FIRST_NAME = 'Hollow' then loyal_to = 'DEMON'
end case from originals;