Perhaps something like:
=INDEX(IF(A1="X",$X$1:$Y$10,$Z$1:$AA$10),ROWS($A$1:$A1),COLUMNS($A$1:A$1))
where A1 contains the answer that defines table, and X1:Y10 and Z1:AA10 contain the 2 tables to choose from.
the formula when copied down and to next column will extract the 2 table columns.
Bookmarks