title: oracle how to write in stored procedure to get specific values
body: <p>I am not sure how to write in stored procedure of Oracle. It is kind of new to me. </p>
  
  <pre><code>Table 1:  Bank:
  
  Bank_Id    Description
  001        FNB
  002        ABSA
  
  Table 2:  Config
  
  Config    ConfigName
  1         SUTS allocated
  2         SUTS unallocated
  3         GOV allocated
  4         GOV unallocated
  
  Table 3: Config_Value
  
  Config_Value_Id      Bank_Id    Config_Item_Id  ConfigValue
  1                    001         1              FNBSAD
  2                    001         2              FNBSUAD
  3                    001         3              FNBGAD
  4                    001         4              FNBGUAD
  </code></pre>
  
  <p>Config_Value is a relationship between Config and Bank table. </p>
  
  <p>When I write code in C# to set two values of : <br/></p>
  
  <ul>
  <li>string bank = "FNB"</li>
  <li>string paymentType = "SUTS"</li>
  </ul>
  
  <p>Then these values will pass to stored procedure. I want to write IF or SWITCH statement in stored procedure such as:</p>
  
  <pre><code>IF (@PaymentType == 'SUTS')
  need to get two values:
    ConfigValue = @param1 where ConfigName = 'SUTS allocated' AND where bank = @bank
    ConfigValue = @param2 where ConfigName = 'SUTS unallocated' AND where bank = @bank
  
  IF (@PaymentType == 'GOV')
  need to get two values:
    ConfigValue = @param1 where ConfigName = 'GOVallocated' AND where bank = @bank
    ConfigValue = @param2 where ConfigName = 'GOV unallocated' AND where bank = @bank
  </code></pre>
  
  <p>Once the values (bank and paymentType) passed to stored procedure, fetching two values of ConfigValue based on bank and paymentType. How to write in stored procedure like above? Can you please give me example code? Thanks a lot!</p>