Most animals can be taught to 'understand' words and I know some of my hammies respond to their names but they don't realise that it is their name. Most pet owners call their animal when they have food for them so they associate the sound made (their name) as the call for when food is available. Basically my Thistle believes that the word "Thistle" means I have something for you to eat come see.
Unlike dogs hammies will only learn a certain number of 'commands' as long as their is something in it for them like a treat, cuddle or time out of the cage. For example, if you link each different treat with a different command theoretically you could teach a hamster tricks because it knows that performing them will lead to it being rewarded with food. I could teach my hammie that if it uses its wheel it gets a yoghurt drop and then link the action with the word 'wheel' then when the word is used the hamster will use the wheel because they believe doing so will result in a yoghurt drop. (This is all theory remember, it would take a lot of time and patience to train a ham)
Dogs however need leadership in order to live a happy life and so although you may teach it the command originally by giving treats when it has performed them, once it has learned the command the dog will perform it even if it is no longer given treats because doing as it's told is all a dog knows in life, it just wants to please its leader. A hamster would soon ignore you when it realised that it wasn't getting treats for it any more
So yes, I think hamsters do 'understand' what we say but the meaning behind it is different. They are shallow creatures at heart