Datastage Column Mapping logic Based on column Value (Or any SQL function to do the same)

I’m trying to find a solution in datastage (Or in SQL) – without having to use a bunch of if/else conditions – where I can map value of one column based on value of another column.

Example – Source File –

ID Header1 Value1 Header2 Value2
1 Length 10 Height 15
2 Weight 200 Length 20

Target Output –

ID Length Height Weight
1 10 15
2 20 200

I can do this using Index/Match function of excel. Was wondering if datastage or Snowflake can look into all these fields similarly and automatically populate the value column to the corresponding header column!

enter image description here