Ответ 1
это должно работать
update table_name
set column_b = case
when column_a = 1 then 'Y'
else null
end,
set column_c = case
when column_a = 2 then 'Y'
else null
end,
set column_d = case
when column_a = 3 then 'Y'
else null
end
where
conditions
возникает вопрос, почему вы хотите это сделать... вы можете пересмотреть модель данных. вы можете заменить null
на все, что хотите.