--select DataName ,
--case Code
--
-- when ‘W01‘ then ‘男‘
--
-- when ‘W07‘ then ‘女‘
--
-- else ‘其他‘
--
-- end as Code
--from dbo.HistoryData
select DataName,
(
case
when Code=‘W01‘ then ‘男‘
when Code=‘W07‘ then ‘女‘
else ‘其他‘
end
)
from HistoryData
时间: 2024-10-13 14:33:43