Ax 2012 look up of tables

I want to create look up of 3 tables and their fields , my requirement is in the first field i would like to show the 3 table names as look up and in the second field i would be showing all the fields of the table selected in the first field.

For e.g if i have Route, sales basket and Invent table in look up of first field, i select Invent table in the first field then in the second field i have to show all the fields of invent table as look up. please help me in this regard.

I have tried using the normal process for look up but could not succeed, please help me in finding the right direction