临时表测试case

declare @T Table (id char(10))
insert into @T select '1'
insert into @T select '2'
insert into @T select '3'


select
case id
     when '1' Then '第一类'
     when '2' Then'第二类'
     else '第三类'
     end
from @T
原文地址:https://www.cnblogs.com/smallfa/p/1584270.html