PHANTOM-79: Added ability to chain multiple CAS clauses to a single quer...

...y.