title: SELECT from Multiple IF conditions in Where Clause
body: <p>I have a following query</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT *
  FROM products a, productImgs b
  WHERE a.visible = 1 AND a.Type IN ('Accessories', 'Clothing', 'Electronics')
  ORDER BY a.visibleOrder ASC
  LIMIT 100
  </code></pre>
  <p>In the above query I need to add IF condition that IF a.Type is Accessories then I need certain a.Brands to select from and if a.Type is Clothing then I need to select from certain a.Brands</p>
  <pre class="lang-none prettyprint-override"><code>For a.Type 'Accessories' -&gt;  a.Brands IN (ALL)
  For a.Type 'Clothing'    -&gt;  a.Brands IN ('A','B','C')
  For a.Type 'Electronics' -&gt;  a.Brands IN ('D','E','F')
  </code></pre>