0 - 2 of 2 tags for column title

I have a table with same column title(not the column names), runing a SQL on it from Java is returing same values for both the columns, it is because of same column title, but same SQL in SQL Assitant returns correct values, where can i find and confirm if same title is reason. is there a driver documentation which states this behaviour.

The column headings/titles revert to "A", "B", "C" whenever I begin a query with a comment (for documentation purposes) or perform a join in a query. However, if I remove the leading comment and/or join, the proper titles appear in my answerset.