title: SQL string pair matching
body: <p>I need help with writing a SQL query.</p>
  
  <p>I have column A, which can carry values like "A-01" , "B-01", B-02"  and so on...</p>
  
  <p>I have column B, which can carry values like "A01", "B01", B02"  and so on....</p>
  
  <p>I want to write a query where 
  data in column A is A-01 and column B is A01 and</p>
  
  <p>data in column A is B-01 and column B is B01 and</p>
  
  <p>data in column A is C-02 and column B is C02 and so on.</p>
  
  <p>I am basically looking for data rows,
  which forms this kind of pair, out of all possible combinations.</p>
  
  <p>I am looking for some kind of variable string matching here. 
  But I don't know if it is possible.</p>
  
  <p>Any help/suggestion is appreciated.
  Thanks,
  -Riyaz</p>