A Database Error Occurred

Error Number: 1327

Undeclared variable: Buy

SELECT *,td.posted_date,(case testimonial_date WHEN '0000-00-00' then response_date else testimonial_date end) as dispDate FROM `ctr_testimonials` t left join ctr_testimonial_directory td on (td.testimonial_id=t.id) WHERE `user_id`='645' and `is_deleted`=0 and `status`='approved' AND is_publish=1 AND(`description`!='' or `response_testimonial`!='' or video_file_name!='') AND CASE WHEN response_rating>0 THEN `response_rating`>3 ELSE `rating`>3 END order by `id` desc LIMIT Buy Now,10