Chennai Super Kings reached the IPL final with a nervy three-wicket win over the Royal Challengers Bangalore.