Is it practical for lawyers to limit themselves only to cases where they believe in the client? Doubtful, particularly if they do legal aid cases. There will be a wide variety of cases I would think, ranging from those where the lawyer thinks the client is innocent to those where he knows the client is guilty. Those are personal opinions though. In the real world a lawyer works for money, not justice. To earn his money he must put up a defense. In the last analysis the court decides on justice, not the lawyer.
There is a cab rank principle so an advocate cannot turn down a client except in vary narrow circumstances.
In cases where the lawyer knows the client is guilty, the he is under no obligation to defend a plea of not guilty because that would mean lying to the court. In that case he may offer a guilty plea but argue mitigating circumstances, or decline the case if the client does not agree.
And you are right, judgement is a matter for the court. The lawyers job is to argue the case.