select case isnull(PAudit ,0) when 0 then '在线' when 1 then '未测试' when 2 then '测试异常' else '已删除' end as PAudit
from program
--null须替换为其他值,不可以 case PAudit when null
select case isnull(PAudit ,0) when 0 then '在线' when 1 then '未测试' when 2 then '测试异常' else '已删除' end as PAudit
from program
--null须替换为其他值,不可以 case PAudit when null