Try this on gradually increasing integers and see how it works
FindInstance[12 == a*1 + b*4 + c*7 && (a==0||a==1) && (b==0||b==1) && (c==0||c==1), {a, b, c}] That does not decide what set you are going to choose from, but you didn't describe that.
If you can revise your question to provide more information about what you really want then I will see if I can improve this answer. As it is, this can still get slow as the numbers and the set to choose from grow in size.