SELECT *,
CASE
when PERSONNUM in ('x','y','z')
then 'Home'
end as HomeEmployees
when PERSONNUM in ('a','b','c')
then 'Away'
end as AwayEmployees
FROM dbo.ALLTOTALS
where PERSONNUM in ('a','b','c','x','y','z')
and HomeEmployees is not null
-- 選択した PERSONNUM フィールドに基づく複数の場合