I\'m trying to get rid of a raw sql case/when in my eloquent query, but am not sure what the best way is to do this. I have:
$data = Table::query()->select