title: including a conditional statement in a =QUERY function
body: <p>How can I add a conditional statement (similar to an 'if elseif' in .php) to the query listed below so that it will return columns D and E from Sheet2 if column C in the responses sheet == 1st, or columns F and G from Sheet2 if column C in the responses sheet == 2nd? It must still only return column data from the appropriate row (based on the query).</p>
  
  <pre><code>=QUERY(Sheet2!$A$1:K; CONCATENATE("SELECT B, C WHERE A = ", responses!B1), 0)
  </code></pre>
  
  <p>I looked into IF(OR), but I don't believe that will work because final project will have more than two possibilities (there will actually be eight, 1st through 8th class period). </p>
  
  <p><a href="https://docs.google.com/spreadsheet/ccc?key=0AhNVNg1xSJ6-dGpvdFJGMmpuWExWeUE2SWhFQ21Wb3c&amp;usp=sharing" rel="nofollow">Here is a link to the Google Spreadsheet I'm working with</a></p>
  
  <p>Any suggestions?</p>
  
  <p>Thank you for your time and assistance,<br>
  Todd<br>
  High School Teacher</p>