title: SQL LIKE on Alias
body: <p>Is this possible?</p>
  
  <p>I'm trying to do a SQL statement on an alias but getting an error...</p>
  
  <pre><code>SELECT 
        CASE PERSON_TYPE  WHEN 'PER' THEN LAST_NAME
                                     ELSE COMPANY_NAME
        END AS FULLNAME, *
  FROM PERSON
  [WHERE FULLNAME LIKE '%AN%'] // Error FULLNAME - INvalid COlumn Name
  </code></pre>
  
  <p>otherwise, this is the alternative I'm using....</p>
  
  <pre><code>WHERE (LAST_NAME LIKE '%AN%') OR (COMPANY_NAME LIKE '%AN%')
  </code></pre>
  
  <p>Thanks</p>