Yes...in a SP...at least in MS-SQL (or transact SQL) you can store a column name in a variable.  The simplest solution would be to build your query string w/ the column in question in a varchar variable and then run an EXEC <variable> w/i the SP.
In the case of what you're talking about----it sounds like it would just be easier for you to build an if else statement looking at the value/column combo and just running an EXEC for each case of the if clause.
As far as doing it in a 3GL....as long as you're not using friggin cursor's you'll be faster in most cases running it in the SP.  If the statement that gets "Exec'd" is highly dynamic.....then the benefits of a SP are mostly lost as the best solution would end up being using a "Create Procedure With Recompile"....which when I ever find myself in that case, I just move it out of hte SP b/c there's no use in it being in the SP anymore.  Speed difference is neglible, and when my sp's get to that point, I find that they're getting too complex, and need to be reworked anyway.