You can use a matrix to specify the columns in the stack command. Here is an example using a sample table:
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
StackDT = dt << Stack(
columns( 5::10 ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Drop All Other Columns( 1 )
);