title: SQL Server 2008 - Return not null values from a CASE WHEN statement
body: <pre><code>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
  </code></pre>
  
  <p>--multiple whens based upon select PERSONNUM fields</p>