Usually in business zones ie 1st class. There are exceptions, like 2nd class on the ZVV Zürich S-Bahn S8 ( upstairs, adjacent to the 1st class car ).
On long haul routes, SBB InterCity and InterRegio offer sockets on some but not all cars inclusive of 2nd class. The Family Car ( 2nd class 5 seater ) always has a socket, I am in fact using it right now.
They are almost always Swiss style three prong sockets.