code: public static String getCoalesceColumnNames(String columnOrColumnList) {
      if (Strings.isNullOrEmpty(columnOrColumnList)) {
        return null;
      }
      if (columnOrColumnList.contains(",")) {
        return "COALESCE(" + columnOrColumnList + ")";
      }
      return columnOrColumnList;
    }
docs: Get coalesce of columns if there are multiple comma-separated columns