用case when 条件 then xxx
when..............then
when..............then
end
eg:
select t.taxpayerid,
case
when t.taxpayerver = '1' then
'dddd'
when t.taxpayerver = '3' then
'kkkk'
end,
t.*
from tb_reg_taxpayerbasicinfo t
when..............then
when..............then
end
eg:
select t.taxpayerid,
case
when t.taxpayerver = '1' then
'dddd'
when t.taxpayerver = '3' then
'kkkk'
end,
t.*
from tb_reg_taxpayerbasicinfo t