Prueba esto
SELECT 100 * SUM(IF(CA001Result='Fail', 1, 0)) / COUNT(CA001Result) as 'CA002 %'
FROM Data_Table
WHERE '$product' AND Area='$Area'
Prueba esto
SELECT 100 * SUM(IF(CA001Result='Fail', 1, 0)) / COUNT(CA001Result) as 'CA002 %'
FROM Data_Table
WHERE '$product' AND Area='$Area'