This is achieved by selecting the Interactive Mail Download option in the Connect Dialog.
You can also opt to have this option always checked when you open the Connect Dialog in Configuration Preferences Connections
The principle is that you go online, examine each message, deciding there and then what should be done, and this is actioned immediately, and you are then shown the next message and so on.
Thus, you can download individual messages, leave others on the server, and delete others.
If more that one mailbox is configured to be accessed, then once you have seen all of the messages in the first, you will be taken to the second, and so on.