You need to add an "End" to the end of your case statement.
This:
AND a.bt_active = case @in_supplier_type_id when 2 THEN @bt_active
should be this:
AND a.bt_active = case @in_supplier_type_id when 2 THEN @bt_active End
You can also use an Else if need be.