If an appeal is taken from an order of the lower court dismissing the case without a trial on the merits, the Regional Trial Court may affirm or reverse it, as the case may be. In case of affirmance and the ground of dismissal is lack of jurisdiction over the subject matter, the Regional Trial Court, if it has jurisdiction thereover, shall try the case on the merits as if the case was originally filed with it. In case of reversal, the case shall be remanded for further proceedings.