In my project I want data from same table in 2 different manner.
1) Only 5 fields
2) Only 10 fields
And I am getting the data through Stored Procedure for each one. But I want that if possible I should make one procedure.
So, can I put if condition for selecting column?
For example, if I pass parameter as "Less", it will get data of only 5 columns and if I pass parameter as "More", it will get data of 10 columns. I can have two SELECT statement in procedure based on condition(that I have already done) but I want to make it One SELECT statement. Is it possible?