I think it's wise to note Ciampa and Rosner's words on this text: "Paul’s use of the terminology is not consistent enough to be dogmatic."1 That commentary suggests that it is possible that "revelation" and "knowledge" are froms of information and prophecy and teaching are ways of communicating that information respectively (revelation by prophecy; knowledge by teaching).
Paul's use of the four terms throughout the rest of the book and his letters is not thoroughly consistent. It seems that in 1 Corinthians 14:6 revelation is referring to information about eschatological events (the now and not yet), knowledge refers to cognitive knowledge,2 prophecy refers to biblical edification,3 and teaching refers to, well, teaching. The words don't really mean anything special unless we read doctrine into the words "revelation" and "prophecy." Again to reiterate, it is hard to know since Paul is not consistent in his use of the words "revelation" and "prophecy."
So, the differences is that, in my opinion, revelation and knowledge are two forms of information, and prophecy and teaching are two forms of receiving that information.
1Ciampa, Roy E., and Brian S. Rosner. The First Letter to the Corinthians. The Pillar New Testament Commentary. Grand Rapids, MI; Cambridge, U.K.: William B. Eerdmans Publishing Company, 2010. 679.
2Thiselton, Anthony C. The First Epistle to the Corinthians: A Commentary on the Greek Text. New International Greek Testament Commentary. Grand Rapids, MI: W.B. Eerdmans, 2000. 1102.
3"the term ‘prophecy’ should be read throughout chapter 14 as synecdoche for all forms of intelligible speech gifts that edify the church." Ciampa & Rosner, 679.