可以
update 表
set C = case when a is null then B
else A+B 
end