Good evening,
I need the return of a SELECT to be dependent on the parameter that is passed in SELECT
Example declare @variavel nvarchar (50)
Select field campob, campoc, campod, campoe,
from table
I need to be:
@variaval = campoa return: select field, fieldb from table
if
@variavel = campob return: select fieldb, campoc, campod from table
How to make this logic?