select id,userid, ys,
case
when pj_ys is NULL
then ( case when pj_ys1 is NUll then ys else pj_ys1 end)
else pj_ys end t
from dbo.tbl_Emplyeeblogs
https://blog.csdn.net/spw55381155/article/details/79891192