title: Why can't I use filter my WHERE clause on a CASE statement column in SQL Server?
body: <p>In my select statement there is a CASE WHEN THEN ELSE END AS statement that I am not able to filter on in my WHERE clause. I do not see why this would be an issue, could someone shed some light?</p>
  
  <pre><code>SELECT        
  CASE 
      WHEN m.Country IN ('CANADA', 'UNITED STATES', 'USA', 'MEXICO') THEN 'NA' 
  WHEN m.Country IN ('BRAZIL') THEN 'JD2' 
      WHEN m.Country IN ('NZ', 'NEW ZEALAND', 'AUSTRALIA', 'AUSTRALASIA') THEN 'ANZ' 
  ELSE 'Unknown' 
      END AS DerivedRegion,
      m.ID,
      m.[Account Name], 
  m.[Display Name], 
  m.[Last Name], 
  m.[First Name]
  FROM dbo.Users AS m
  WHERE DerivedRegion = 'Unknown'
  </code></pre>
  
  <p>There WHERE clause gives me the error: Invalid column name 'DerivedRegion', why? </p>