title: Oracle update field A or field B depending on input parameter
body: <p>I would like to be able to choose which field in my table is updated by my stored procedure based on an input parameter's value. If the input field is equal to 'draft' it should update <strong>id_draft</strong>, otherwise it should update <strong>id</strong>.
  Is this possible?</p>
  
  <p>This is one of my failed attempts that may help illustrate what I want to do:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE sp_test (input_field VARCHAR DEFAULT NULL)
   IS
     BEGIN
        UPDATE TABLE
        SET
          CASE
              WHEN input_field = 'draft' THEN id_draft
              ELSE id
     END = 'x'
  </code></pre>