How to get Table B from Table A? Thanks
===

Table A:

AB
BC
CD
EF
FG


Table B: 

AD
BD
CD
EG
FG

I have tried multiple ways but the query is too long and would like to find a simplified method. Thanks so much.