I assume you’re using MySQL 5.7, which adds the JSON data type. Use JSON_EXTRACT(colname, '$.cost') to access the cost property. It will be NULL is there’s no such property.
WHERE JSON_EXTRACT(colname, '$.cost') IS NOT NULLWHERE JSON_EXTRACT(colname, '$.cost') IS NULLWHERE JSON_EXTRACT(colname, '$.cost') != ''
It will also be NULL if the value in the JSON is null; if you need to distinguish this case, see Can’t detect null value from JSON_EXTRACT