From: Bala on
Hi Adam Woods,

There is no referential integrity between two tables. But if a table has minimum number of columns, we can use atribute with value to get your appropriate result. I hope this query will help you. If yes, you can send me a comment about this.
Qery :
select a.stock_code,b.opposite_name,b.Field_name,
case
when b.opposite_name='col_1' then a.col_1
when b.opposite_name='col_5' then a.col_5
when b.opposite_name='col_7' then a.col_7
when b.opposite_name='col_13' then a.col_13
when b.opposite_name='col_9' then a.col_9
end Value from tbl_13 a ,
CAT_TABLE_LIST b where b.TBL_NAME = 'TBL_13' AND a.STOCK_CODE ='FC-25'

Thank you,
G.Balasubramaniyam
Application DBA