code: func (b *builtinCaseWhenJSONSig) evalJSON(row chunk.Row) (ret json.BinaryJSON, isNull bool, err error) {
  	var condition int64
  	args, l := b.getArgs(), len(b.getArgs())
  	for i := 0; i < l-1; i += 2 {
  		condition, isNull, err = args[i].EvalInt(b.ctx, row)
  		if err != nil {
  			return
  		}
  		if isNull || condition == 0 {
  			continue
  		}
  		return args[i+1].EvalJSON(b.ctx, row)
  	}
  	// when clause(condition, result) -> args[i], args[i+1]; (i >= 0 && i+1 < l-1)
  	// else clause -> args[l-1]
  	// If case clause has else clause, l%2 == 1.
  	if l%2 == 1 {
  		return args[l-1].EvalJSON(b.ctx, row)
  	}
  	return ret, true, nil
  }
docs: // evalJSON evals a builtinCaseWhenJSONSig.
  // See https://dev.mysql.com/doc/refman/5.7/en/case.html