The total work done on a particle is equal to the change in its kinetic energy
always
only if the force acting on it is conservative
only if gravity acts only on it
only when the elastic force acts on it alone.
According to the theorem, the total work done by all forces acting on a particle is always equal to the change in kinetic energy of the particle. Here, the force can be conservative or non-conservative.