select a=
case
when b='0' then '未提交'
when (b='1' and c='0') then '已生效'
when (b='1' and c='1') then '已注销'
end ,
* from A
select id,a=
case
when b='0' then '未提交'
else case
when d='1' then '已变更'
else case
when c='0' then '已生效'
else '已注销'
end
end
end
from A
联系客服