SELECT FROM TESTTABLE WHERE columnA = 2
UNION ALL
SELECT FROM TESTTABLE WHERE columnB = 3;
What? You're NOT using DB2? You didn't mention which database.
The best I could come up with on short notice for MySQL is:
alter table testtable add column (matches integer default 0);
update testtable set matches=matches+1 where columnA='2';
update testtable set matches=matches+1 where columnB='3';
You can probably do this with a subselect in Oracle or Postgress, but we'll leave that as an exercise for the reader.