更新手順を書きたい
どの方法が最適か
1)方法 1
if(condition)="P"
update table
set fields1
where field2 = "2" ;
else(condition)="U"
update table
set fields1
where field3 = "3" ;
2) 方法 2
case condition
when "p"
update table
set fields1
where field2 = "2" ;
when "u"
update table
set fields1
where field3 = "3" ;
どの方法を使用する必要があるか、それを使用する理由と、他の方法が適していない理由を教えてください。