I have function where I select common fields for task, I have task_type and I need to select different fields by task_type and then return Json. I don\'t know SQL and Postgr