func combinedCaseBranchType(left, right sql.Type) sql.Type {
	if left == sql.Null {
		return right
	}
	if right == sql.Null {
		return left
	}
	if sql.IsTextOnly(left) && sql.IsTextOnly(right) {
		return sql.LongText
	}
	if sql.IsTextBlob(left) && sql.IsTextBlob(right) {
		return sql.LongBlob
	}
	if sql.IsTime(left) && sql.IsTime(right) {
		if left == right {
			return left
		}
		return sql.Datetime
	}
	if sql.IsNumber(left) && sql.IsNumber(right) {
		if left == sql.Float64 || right == sql.Float64 {
			return sql.Float64
		}
		if left == sql.Float32 || right == sql.Float32 {
			return sql.Float32
		}
		if sql.IsDecimal(left) || sql.IsDecimal(right) {
			return sql.MustCreateDecimalType(65, 10)
		}
		if left == sql.Uint64 && sql.IsSigned(right) ||
			right == sql.Uint64 && sql.IsSigned(left) {
			return sql.MustCreateDecimalType(65, 10)
		}
		if !sql.IsSigned(left) && !sql.IsSigned(right) {
			return sql.Uint64
		} else {
			return sql.Int64
		}
	}
	return sql.LongText
}
From the description of operator typing here:
https://dev.mysql.com/doc/refman/8.0/en/flow-control-functions.html#operator_case
package expression
import (
	"bytes"
	"github.com/dolthub/go-mysql-server/sql"
)
type CaseBranch struct {
	Cond  sql.Expression
	Value sql.Expression
}
type Case struct {
	Expr     sql.Expression
	Branches []CaseBranch
	Else     sql.Expression
}
func NewCase(expr sql.Expression, branches []CaseBranch, elseExpr sql.Expression) *Case {
	return &Case{expr, branches, elseExpr}
}