For this case you could think about not using enable_if at all. It is posible to simply specialise f:
template
struct S {
template int f(T t);
};
template
template
int S::f(T t) { return 2; }
template<>
template
int S<1>::f(T t) { return 1; }
int main() {
S<1> s1;
return s1.f(99);
}