title: Multiple conditions in oracle case statement
body: <p>I have some trouble achieving my requirement. I have a table called accounts_invoice and data as mentioned below.</p>
  
  <p>DB Table</p>
  
  <pre><code>AC_NO   VARCHAR2(20 BYTE)               
  INV_NO  VARCHAR2(20 BYTE)           
  CC  VARCHAR2(20 BYTE)               
  FT  VARCHAR2(20 BYTE)           
  
  AC_NO  INV_NO   CC      FT
  -----------------------------
  1   A   PTN INVOICE
  1   A   PTN BDE
  2   B   ABC INVOICE
  2   B   PTN INVOICE
  2   B   PTN BDE
  </code></pre>
  
  <p>I have written a code as below, but my output seems not right as per my requirement.</p>
  
  <pre><code>SELECT
      ac_no,
      CASE WHEN FT like '%INVOICE%' THEN 'AVAILABLE' else 'NOTAVAILABLE'
  END AS INVOICE,
          CASE WHEN FT like '%BDE%' THEN 'AVAILABLE' else 'NOTAVAILABLE' END AS BDE
  FROM Account_info
  where CC='PTN';
  </code></pre>
  
  <p>Output </p>
  
  <pre><code>1   A   Available   Notavailable
  1   A   Notavailable    Available
  2   B   Available   Notavailable
  2   B   Notavailable    Available
  </code></pre>
  
  <p>I'm Expecting the Output as below:
  But Output should be</p>
  
  <pre><code>AC_NO    INVOICE         BDE
  ----------------------------------
  1       AVAILABLE       AVAILABLE
  2       AVAILABLE       AVAILABLE
  </code></pre>
  
  <p>Please help me, how can I achieve the above output.</p>