Add case expression class for simple SQL case statements

References #4202

Usage is:
```
$query->newExpr()->addCase($expression, $valueIfTrue, $valueIfFalse)
```

`$expression` must be a QueryExpression instance.
But snow flakes are so pretty :) You're right, it should use the same
technique as the other expressions. I'll get to it tomorrow.
On 12 Aug 2014 7:20 PM, "José Lorenzo Rodríguez" <notifications@github.com>
wrote:

> In src/Database/Expression/CaseExpression.php:
>
> > +			];
> > +		} elseif (is_array($value) && !isset($value['value'])) {
> > +			$value = array_keys($value);
> > +			$value = end($value);
> > +		}
> > +		return $value;
> > +	}
> > +
> > +/**
> > + * Gets the correct type for the value
> > + *
> > + * @param mixed $value The value to test
> > + *
> > + * @return null|string
> > + */
> > +	protected function _getType($value) {
>
> The presence of this function made me realize that this is the only
> expression object that is not taking a $types argument as the rest. I don't
> think this should be a snow flake inferring types out of the passed
> variables. We can either only accept ExpressionInterface for each of the
> arguments or we need to add type matching like the rest of the expressions
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cakephp/cakephp/pull/4227/files#r16127773>.
>