title: How can I use alias name in where clause in MySQL?
body: <p>how can i use alias name in where clause in mysql</p>
  
  <pre><code>SELECT 
      *,
      CASE roles.rol_active
          WHEN '1' THEN 'yes'
          WHEN '0' THEN 'no'
      END AS roles_active
  FROM
      roles
  WHERE
      rol_is_deleted = 
   AND (rol_name LIKE '%ac%' 
    OR rol_display_name LIKE '%ac%'
    OR rol_description LIKE '%ac%'
    OR rol_active LIKE '%ac%'
    OR rol_updated_by LIKE '%ac%'
    OR rol_updated_at LIKE '%ac%')
  ORDER BY rol_name asc
  LIMIT 10 OFFSET 0;
  </code></pre>