• You can't "set a column name" without using dynamic SQL. You can use a CASE expression to choose between two column VALUES, but this could very well cause performance problems. Why do you want to avoid dynamic SQL ??

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills