Section 39. Any person aggrieved by the refusal of the commissioner to abate or to refund any tax, in whole or in part, whether such refusal results from the denial of an abatement application made under section 36 or section 37, may appeal therefrom, within 60 days after the date of notice of the decision of the commissioner or within 6 months after the time when the application for abatement is deemed to be denied as provided in section 6 of chapter 58A, as follows:

(a) appeals from the decision of the commissioner as to the value of an asset of the estate for purposes of chapter 65C shall be made by filing a petition with the clerk of the appellate tax board;

(b) appeals from the decision of the commissioner as to all other matters arising under chapter 65C shall be made by filing a petition with either the clerk of the appellate tax board or the probate court having jurisdiction of the estate of the decedent;

(c) appeals from the commissioner’s refusal to abate any other tax or to refund any tax, in whole or in part, whether such refusal results from the denial of an abatement application made under section 36 or section 37, shall be made by filing a petition with the clerk of the appellate tax board. If, on hearing, the board or the court, whichever the case may be, finds that the person making the appeal was entitled to an abatement or a refund, it shall make such abatement or refund as it sees fit. If a tax so abated has been paid, the state treasurer, upon presentation to him of the notice of the decision of the board, or the court, shall repay to the petitioner the amount of the abatement and interest computed in accordance with section 40.