title: Two sql if statements
body: <p>I want to run through two <code>IF</code> statements in sql. The IF's are two different conditions, example:</p>
  
  <pre><code>IF (@user == 'Bob')
  BEGIN
     SELECT * FROM table Where id = 1
  END
  IF (@animal == 'Cat')
  BEGIN
     SELECT * FROM table WHERE id = 50
  END
  </code></pre>
  
  <p>What i want back are rows 1 if only the first condition is correct or 1 and 50 if both conditions are met.
  This fails at the second <code>IF</code> statement, is there another keyword I need to add?</p>