updated sql for multiplechoice fieldtype