Replacing the results of a row
what you can do, is to write two stored procedures with the following logic:


Build a stored procedure which does the case thing. This may be optional but the resulting sql would look better and easier to debug/develop.
Define a stored procedure which has as input the tablename
Read out the columns of the table - maybe here can be done some grouping/distinct which columns fall into the case CONFIDENTIALITY_IND
Build up the sql statement dynamically by iterating over the result of 3. When the column is your special case column - apply the stored procedure of 1. Otherwise select it. How to build up dynamic sql look here: http://www.dba-oracle.com/t_oracle_execute_immediate.htm - execute immediate is your friend here.


Hope I understood your problem correct. This would be my way