I have two tables A and B. I want to insert data into tables C and D based on join between A and B (A.column = B.column). What is the best way to accomplish this type of task?

IE-------> If column = xyz then insert into table C
IF column = abc then insert into table D
ELSE do_not_insert

Please help.
Regards

Ziggy