Example Schema:
RowID Quantity ModifiedPrice GroupPrice CustomPrice SalePrice
----------------------------------------------------------------------------
1 5 20.00 0 15.00 17.00
2 2 14.00 7.00 22.00 0
3 9 10.00 10.00 0 11.00
Based on this example table, I would like to be able to select the lowest non-zero value between the four *Price columns in the most efficient/simplest manner possible.
Example Output:
RowID Quantity EndPrice
------------------------------
1 5 15.00
2 2 7.00
3 9 10.00
For extra information, the DB is SQL Server 2005.