Tushar,
First of all, if you have a different question, you should start a new thread. You will get more help that way. I sort of understand what you want, but I want to be 100% sure, so could you post the DDL of the table/view you are querying and the exact query you want with a description of what the query is supposed to do? This will clarify thing for me.
Andy