It's also used to mean "in the manner of", "similar to", or "as though". For that kind of usage, it's very similar to the english word "like".
言ったようにしなさい。Do it like I told you.
勝ったようにするな。Don't act like you've won.
山田さんのような人になりたい。I want to be like Yamada-san.