You could do:
SELECT *
FROM table
WHERE greatest(value1, value2, value3, value4, value5) > 5000 ;
As a note, this is not exactly the same. If any of the values are NULL
this will return NULL
, which is treated as false. The version with or
will skip NULL
values.