"Such as" and "Like" can mean the same or very similar thing if used as a comparison. Such as would always be a comparative statement, like would not.
I want to show you a fruit that grows on a tree, such as an apple.
I want to show you a fruit that grows on a tree, like an apple.
However, they are not interchangeable.
I like you as a friend. Can be a statement, but you would never say: I such as you as a friend.