No output when stored procedure is executed. The select statement works when I create a new query , but does not return any values when calling the store procedure within my Web app.
You want a dynamic sql. try this.
Declare @strSQL nvarchar(2000)
set @strSQL = 'SELECT * FROM investor WHERE ' + @search_by + ' = ''' + @col + ''''
execute sp_executesql @strSQL