Selecting Value Based on Column Id
I am trying to write a query that will select the value based on a column
id. I have the following table definition:
I am given the number of the retail level (eg. 6) and I must query the above
table to obtain the value of that level (ie - retail_level6). The level that
must be selected is unknown, therefore it cannot be hardcoded. I need to
dynamically select the field based on a parameter passed to the procedure
Any help is appreciated.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL