if statement inside mysql query to determine table to select <p>I would like to perform a <strong>if statment</strong> in the middle of a query, I need to find out if oc.product_type == 'clothing' or 'other' If it is clothing, then i need to select the <strong>specific_clothing</strong> table instead of the <strong>non_clothing</strong> table? I really lost with this one </p> <pre><code>SELECT o.total, o.shipping, o.order_date ,oc.product_type, oc.product_id, oc.quantity, oc.price_per ,cu.first_name, cu.last_name, CONCAT(cu.address1, cu.address2) AS address, </code></pre> <p><strong>//here is where im trying to use if</strong> </p> <pre><code> if(oc.product_type = 'clothing' SELECT style FROM specific_clothing where oc.product_id = specific_clothing_id) as item FROM order_contents AS oc INNER JOIN `orders` as o ON oc.order_id = o.id INNER JOIN `customers` AS cu ON o.customer_id=cu.id WHERE o.customer_id = '214'; </code></pre>