WHERE clause seems to be messing up FIELD function
I didn't know MySQL understood &quot;$campaignid&quot; as a variable, in the examples I see &quot;@&quot; being used, as in &quot;@campaignid&quot;.
Anyway, in stead of FIELD (which needs a list of arguments, not an argument containing a list) I'd use LOCATE, with sortValue containing &quot;good_fit,bad_fit,added,undecided&quot;:
SELECT * FROM reservation_form_results
    WHERE campaign_id = $campaignId
    ORDER BY locate(status, '$sortValue')

&quot;undecided&quot; will have the highest location, preceded by added, etc.
db fiddle
PHP MySQL prepared statements