case使用select case namewhen a then Awhen b then Belse C endfrom t_user
case使用
select case name when 'a' then 'A' when 'b' then 'B' else 'C' end from t_user ;
case使用
select case name when 'a' then 'A' when 'b' then 'B' else 'C' end from t_user ;