How to pull a index from the table.

I have a table (A,B & C), when A1 is chosen corresponding B1 has to choose. Sometimes when A2 is chosen C2 must be selected and it should work as incremental.