As a interjection yes
is used to express pleasure, joy, or great excitement.
As a noun yes
is an affirmative expression; an answer that shows agreement or acceptance.
As a verb yes
is (colloquial|transitive) to agree with, to affirm, to approve.
As a adverb certainly is
in a way which is certain; with certainty.