You should define what kind of DB result you want:
$products = DB::query(Database::SELECT, '
SELECT * FROM `products`
GROUP BY CASE `products`.`configurable`
WHEN 'yes' THEN `products`.`id_configuration`
ELSE `products`.`id`
END
')
->as_object('Model_Product') // !!
->execute();
Or, if you use it inside model, you can call ->as_object(get_class($this))
or ->as_object($this)
.