Within any conversation, if you have a dual SIM device, there will be a little SIM button next to the paperclip/attach button. Selecting it will allow you to select the SIM card you want to use. Your selection will be saved for the next time you open the conversation. This SIM selection is currently only available on the phone. The web app or secondary Android devices do not have the ability to select a SIM. They will send from whichever SIM was last used.
Both sent and received messages will display the SIM they were sent from, next to the timestamp. If you're unable to see this, try to tap on the message.
Dual SIM can only be set up on Android 5.1 and above due to system-level limitations.