title: SQLite and If() condition
body: <p>I have a MySQL query that I'm trying to run in SQLite.
  I found out that the <code>IF</code> condition isn't working in SQLite, and should be converted to a <code>CASE</code>.
  As the MySQL query is pretty big to have an overview, I was hoping someone can show me how it should be done. In one of many other MySQL queries, I must convert to SQLite.</p>
  
  <p>Once I see how it should be done in a query that I use (because I'm familiar with it), I assume I can handle it for the others.
  Here is the MySQL that should run in SQLite:</p>
  
  <pre><code>select 
  p.products_model, 
  pd.products_name, 
  m.manufacturers_name, 
  p.products_quantity, 
  p.products_weight, 
  p.products_image, 
  p.products_id, 
  p.manufacturers_id, 
  p.products_price, 
  p.products_tax_class_id, 
  IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price,
  IF(s.status, s.specials_new_products_price, p.products_price) as final_price 
  from 
  products_description pd, 
  products p 
  left join manufacturers m on p.manufacturers_id = m.manufacturers_id 
  left join specials s on p.products_id = s.products_id, 
  products_to_categories p2c 
  where 
  p.products_status = "1" and 
  p.products_id = p2c.products_id and 
  pd.products_id = p2c.products_id and 
  pd.language_id = "1" and 
  p2c.categories_id = "10"
  </code></pre>