SELECT max(case mb.TMbName when '批注' then 1 else 0 end ),
max(case mb.TMbName when '审核' then 2 else 0 end)
FROM dbo.TRoleButton rb,
dbo.TMenu m,
dbo.TMenuButton mb,
dbo.TRoleUser ru
WHERE rb.TRbTMbID=mb.TMbID AND m.TMuID=mb.TMbTMuID
AND ru.TRuTRoID=rb.TRbTRoID AND ru.TRuUserID=186 AND m.TMuID=89