Sort by custom order

Hi,

I was wondering if anyone had encountered a similar problem and how they resolved it.  I have a table set out like this in my protocol:

probe_idArray1Array2Array3ArrayN
A1133
B2244
C1344

..etc

I want to sort the columns (not rows) by the order specified in another table:

OrderArray
1Array3
2Array5
3Array1

.. etc.

I've tried a few ways but can't get close to doing it, could anyone suggest a solution?

Thanks,

Liz