please help me in rectifying formula

=QUERY(Database!A1:M,"Select * where 1=1, "&IF(B2="Company Name","","&B2&"),1)

it is returning #Value


how to make this formula work