title: Doctrine CASE WHEN with WHERE IN statement
body: <p>Good day, everyone!</p>
  
  <p>I have following Doctrine query to retrieve some CTI entities:</p>
  
  <pre><code>SELECT s.id 
  FROM CRM\SpendBundle\Entity\Spend s
  WHERE (CASE 
          WHEN s INSTANCE OF 'CRM\BusinessTripBundle\Entity\BusinessTrip' THEN 'Business Trip' 
          WHEN s INSTANCE OF 'CRM\ExpenseRequestBundle\Entity\ExpenseRequest' THEN 'Expense Request' 
          ELSE '' END) IN(:availableSpends)
  </code></pre>
  
  <p>Parameter availableSpends is just an array of strings:</p>
  
  <pre><code>availableSpends = array('Expense Request')
  </code></pre>
  
  <p>And this query throws an error: </p>
  
  <pre><code>[Syntax Error] line 0, col 439: Error: Expected =, &lt;, &lt;=, &lt;&gt;, &gt;, &gt;=, !=, got 'IN'
  </code></pre>
  
  <p>What can i do with CASE statement to avoid this error? Doctrine version is 2.5.1</p>