select field1,
(case
when condition then dosomthing
when condition then dosomthing
else dosomthing
end) fieldname
from tablename
--或者在products、tigger和function中也可以使用
select field1,
(case
when condition then dosomthing
when condition then dosomthing
else dosomthing
end) fieldname
from tablename
--或者在products、tigger和function中也可以使用