STARTING TROUBLE

1996 Toyota Corolla • 124,000 miles

I have a 1996 toyota corolla. Last year it started giving problem with starting. Sometime it will not start even though battery was okay and you can hear click on turning key. Sometime it will start fine.I changed the starter and cleaned the connection that connect battery to the chasis (earth) the problem went away. The problem reappered few days back and cleaned the earth wire again but it dose not start. Battery seems to be okay as lights turn on and I do hear click when I turn keys but the motor will not turn. I will appreciate any help. Thanks