In a script you would use $chan() and its 'topic' property,
but if you just want to view the topic of a channel then '/topic #channelname' or '//topic $chan' or '//topic #' will do exactly that.
Mind the double slash when using $chan or # (same thing), though, to make mIRC evaluate $chan/# to the actual channel name.