title: Convert excel formula to SQL
body: <p>Hi I have a table in excel which has a formula with it. I need this formula to be in SQL form. I have tried this:</p>
  
  <p><code>SELECT IIF (C2 = "L",IIF(B2 &lt; A4,B4,B2),A4)</code></p>
  
  <p>but i need to convert the cell to a SQL selection</p>
  
  <p>Here is a link to the table:</p>
  
  <p><a href="http://i.stack.imgur.com/mFJ4l.png" rel="nofollow">Excel Table</a></p>