You could make that part of the query dynamic, like this:
(sql (:select '* :from 'kupci :where (:and (:raw (if TEST (sql (:like 'ime (concat-string "%" (parameter "ime") "%"))) t)) (:raw (if TEST2 (sql (:like 'prezime (concat-string "%" (parameter "prezime") "%"))) t)))))