Ще използвате insert . . . select
с case
изявление:
INSERT INTO table(column1, column2)
select (case when *expression* then 'value1' end) as column1,
(case when not *expression* then 'value2' end) as column2;
Подозирам обаче, че може наистина да искате update
а не insert
:
update table
set column1 = (case when *expression* then 'value1' else column1 end),
column2 = (case when not *expression* then 'value2' else column2 end);