I have two tables (table1 and table2). I need a SQL query. If I enter A001 or A002 or A003 etc the output should be A001 or A002 or A003, respectively (means A001 for A001, A002 for A002, this is common). But If I enter A201 or A202 the output should be “A001 and A201 for A201” or