So let's say it's 2020 and almost every job has been taken over by robots. Self-driving cars cause fewer (virtually zero) accidents when compared to humans. Software can process data faster than any clerk ever could. Farming can be done faster and more cost effectively by a giant team of agricultural robots. However, 45% of the population is unemployed, because we denied the robot takeover rather than taking time to come up with a solution. Let's hope this doesn't actually happen, but if it does, who among us would retain any job security?
As of right now, a robot cannot learn to be curious or think of something no one else has thought of. This leaves most scientists with their jobs. Robots also cannot be human. They can never look exactly like a human and empathize with someone in a real way. This could, ironically, mean that the doctor's jobs would be taken over by smart robots, but nurses would still be in demand, as sick people need human empathy and someone to comfort them. In short, real bedside manner is not something a robot can do, because it is so inherently not robotic. Robots will also probably never create a personality with themselves or find a way of connecting to people. This means that the teaching profession (arguably one of the most important professions) will be left relatively intact. If we could learn with just a robotic voice reading a textbook, we would already be doing it. Robots cannot critically think about and decide things about human affairs, so politicians would still have their power (although robots would probably be more honest). Naturally engineers and computer scientists would still have their jobs, as they would be needed to move this technology forward.
This problem that we will be facing soon may or may not be avoidable. I'm not going to pretend I have any ideas about how to keep humans employed when they become out of date and inefficient. However I know one thing we should not do: stop moving forward. We need to, and we will, move forward in leaps and bounds. This is a train we cannot stop. However, we have little time before we have nothing left to do. We as a race need to have a family meeting. Sure, most of us may lose our jobs. But how can we fix it? How can we save ourselves from moving forward into another Great Depression where only those who cannot be replaced by a machine have work? This is a problem that will take a long time to solve. Let us just hope it does get solved.