Is there's another function to optimize this query in MySQL? I want to use a function that returns for me the same result in one line is that's possible??

MIN(
    CASE 
       WHEN (data.pro LIKE '1 %'   )  THEN 1
       WHEN (data.pro LIKE '2 %'   )  THEN 2
       WHEN (data.pro LIKE '3 %'   )  THEN 3
       WHEN (data.pro LIKE '4 %'   )  THEN 4
       WHEN (data.pro LIKE '5 %'   )  THEN 5
       WHEN (data.pro LIKE '6 %'   )  THEN 6
    END) as products


Many thanks for any help.
You can use a regular expression to match '1 ' to '6 ' at the beginning of the string:

data.pro rlike '^([1-6] )'


Now put this in a CASE:

case when data.pro rlike '^([1-6] )' 
     then cast(substring(data.pro from 1 for 1) as unsigned)
end


See the result in MySQL 5.5 on SQLFiddle.