title: Oracle SQL if else String
body: <p>i have a table that contains a list of names called <code>queues</code>. All of these queues have some data (<code>integer</code>) now in some cases i want two of the queues to be as one and i have therefore tried to create the following statement:</p>
  
  <pre><code>    (case when QUEUE in ('Erhverv', 'ErhvervOverflow') then 'Erhverv' 
            ELSIF WHEN QUEUE in ('Hotline', 'TekniskHotline') then Hotline+TekniskHotline' 
            else QUEUE end
      ) as QUEUE,
  </code></pre>
  
  <p>However it does not seem to work. </p>
  
  <p>Can anyone tell me what I'm doing wrong?</p>
  
  <p><strong>FULL SQL STATEMENT</strong></p>
  
  <pre><code>    SELECT   TRUNC(TIDSPUNKT) AS PERIOD,
           (CASE queue WHEN queue in ('Erhverv', 'ErhvervOverflow')
   then 'Erhverv' WHEN queue in ('Hotline', 'TekniskHotline') 
  then 'Hotline+TekniskHotline' ELSE QUEUE end) as QUEUE,
           SUM(ANTAL_KALD) AS CALLS,
           SUM(INTERN_KALD) AS INTERNAL_CALLS
  FROM     KS_DRIFT.PERO_NKM_KØ_OVERSIGT
  WHERE    TIDSPUNKT &gt;= '2013-06-18'
  AND      TIDSPUNKT &lt;= '2013-07-03'
  GROUP BY TRUNC(TIDSPUNKT), QUEUE
  </code></pre>