title: Using CASE expression in Oracle
body: <p>I have a scenario, where if prompt from the user (either 1 or 0)=1 then it has to return values from dual else it has to  return the other table  data</p>
  
  <p>Below query I have tried: but getting an error: too many values</p>
  
  <pre><code>with CTE_ACC_FNKEYS AS (
  (select 
  CASE WHEN 1=1
  --@Prompt('Users:','A','Customer\Customer Account\Source System Code',Mono,Free,Not_Persistent,,User:3) is not null
  then (select  e,f,g,h  from dual)
  else
     (
     SELECT
        a,b,c,d
     FROM
         TABLE ( BI_RPT.GET_ACCOUNTDETAILS( 'ON897451','[SA].[0]') ))
  
  end as b  from dual      
  ))
  
  select * from CTE_ACC_FNKEYS
  </code></pre>