please solve this query correctly,
June 21, 2008 at 3:54 PM
SELECT MIN(CASE WHEN price1<price2 and price1<price3 and price1<price4 and price1<price5 and price1<price6 and price1=0 THEN price1 When price2<price3 and price2<price4 and price2<price5 and price2<price6 THEN price2 when price3<price4 and price3<price5 and price3<price6 then price3 when price4<price5 and price4<price6 then price4 when price5<price6 then price5 ELSE price6 END) as minvalue FROM product_cheap where id=1