select count (1) [count] where flag=1
union all 
select count (1) where flag=2
union all 
select count (1) where flag=3