Carillon Assisted Living, LLC (“petitioner”) appeals from order entered granting the North Carolina Department of Health and Human Services, Adult Care Licensure Section’s (“DHHS”) motion to dismiss petitioner’s constitutional, breach of contract, and damages claims and its claims against DHHS and the State for lack of jurisdiction and summary judgment for respondents on all remaining claims. We reverse and remand.
I. Background
Karen Moriarty Penry founded Carillon Assisted Living, LLC in 1996. Petitioner established an office in Raleigh to develop assisted living facilities in North Carolina. As of 29 January 2004, petitioner operated six licensed assisted living facilities in six different North Carolina counties.
In June 1997, petitioner filed plans with DHHS for development of twenty-one assisted living facilities.
On 28 August 1997, the North Carolina General Assembly imposed a moratorium on the development of additional assisted living facilities. The moratorium was retroactive to 1 July 1997 and expired on 30 June 1998. The law provided:
From the effective date of this Act until 12 months after the effective date of this Act, the Department of Health and Human *267Services shall not approve the addition of any adult care home beds for any type home or facility in the State, except as follows:
(1) Plans submitted for approval prior to May 18, 1997;
(2) Plans submitted for approval prior to May 18, 1997, may be processed for approval if the individual or organization submitting the plan demonstrates to the Department that on or before August 25, 1997, the individual or organization purchased real property, entered into a contract to purchase or obtain an option to purchase real property entered into a binding real property lease arrangement, or has otherwise made a binding financial commitment for the purpose of establishing or expanding an adult care home facility,
1997 N.C. Sess. Laws 443.
On 30 October 1998, the legislature reinstated the moratorium retroactive to 1 July 1998 through 26 August 1999. The legislature again extended the moratorium in 1999 and 2000. It remained in force through 31 December 2001.
In January 1999, DHHS declined to issue a declaratory ruling that eight of petitioner’s new projects and six of its expansion projects were to be exempt from the moratorium. Petitioner petitioned for review in Wake County Superior Court alleging: (1) its proposed projects were exempt from the moratorium; (2) the moratorium was unconstitutional; and (3) application of the moratorium to petitioner’s projects was unconstitutional. The court ruled in petitioner’s favor on 15 October 1999 and held that the projects were exempt from the moratorium and petitioner was entitled to develop all twenty-seven projects. DHHS appealed.
On 20 June 2000, petitioner, DHHS, and the State of North Carolina through its Attorney General, entered into a settlement agreement that resolved and settled the litigation. In the agreement, petitioner agreed to forego its constitutional challenges to the moratorium in exchange for the unconditional right to develop nineteen projects (“settlement projects”) instead of the twenty-seven petitioner applied for. In accordance with the agreement, the trial court’s order was vacated and the pending appeals were withdrawn.
The General Assembly enacted the 2001 Session Law, which provided the moratorium would expire on 31 December 2001. After 31 December 2001, all assisted living facilities were to be subject to a *268Certificate of Need (“CON”) law. N.C. Gen. Stat. § 131E-175 (2003). The 2001 Session Law provides, “any person who obtained an exemption” under the moratorium must meet financing and construction deadlines on its exempt projects to save the exemption. 2001 N.C. Sess. Laws 234. The exemption holder must provide DHHS with evidence of: (a) the funding to cover the project’s capital costs by 1 June 2004; (b) the completion of building foundation and footings by 1 December 2004; and (c) the issuance of a certificate of occupancy by 1 December 2005. Id. If the holder of the exemption fails to meet these deadlines, the exemption is terminated. Id.
Petitioner maintained the deadlines did not apply to its development plans and did not comply with the statutory deadlines for many of its projects. DHHS advised petitioner that it could not develop forty-three projects (“gap projects”) for which petitioner filed plans during the four-month period between the date the moratorium expired, 30 June 1998, and the date it was reinstated, 30 October 1998. DHHS asserted that if the moratorium precluded petitioner from developing the gap projects until 31 December 2001, the moratorium’s expiration date precluded petitioner from developing the gap projects absent a CON.
On 24 July 2003, petitioner filed a contested case in the Office of Administrative Hearings. Petitioner asserted: (1) the 2001 Session Law is inapplicable to the settlement projects; (2) DHHS breached the settlement agreement; and (3) the application of the 2001 Session Law and moratorium to the settlement projects and the gap projects violated petitioner’s rights under the United States and North Carolina Constitutions.
Administrative Law Judge Beecher R. Gray (“ALJ”) ruled in petitioner’s favor on 13 May 2004. The ALJ found the parties had agreed and settled for petitioner to possess an unconditional right to develop the settlement projects, had not agreed solely to an exemption from the moratorium, and the deadlines contained in the 2001 Session Law did not apply to the settlement projects.
On further review, DHHS reversed the ALJ. DHHS dismissed petitioner’s constitutional, breach of contract, and damages claims, and its claims against the State for lack of jurisdiction. DHHS granted summary judgment for itself and the State and rejected petitioner’s claim that the 2001 Session Law is inapplicable to the settlement projects and on its claim relating to the gap projects.
*269On 11 August 2004, petitioner filed a petition for judicial review in Wake County Superior Court. The trial court granted respondents’ motion to dismiss petitioner’s constitutional, breach of contract, and damages claims, and its claims against the State for lack of jurisdiction. The trial court granted summary judgment for respondents on all remaining claims. Petitioner appeals.
II. Issues
Petitioner argues the trial court erred by: (1) failing to uphold the decision of the ALJ granting summary judgment for petitioner on the ground that the 2001 Session Law did not apply to the Settlement Projects; (2) dismissing petitioner’s constitutional, breach of contract, and damages claims, and its claims against the State for lack of jurisdiction; and (3) failing to grant summary judgment for petitioner on its constitutional claims. Petitioner argues it is entitled to develop the gap projects for which plans were filed with DHHS when there was no moratorium or other development conditions were in effect.
III. Standard of Review on Administrative Claims
The appropriate standard of review in this case depends upon the issue being reviewed. This Court has stated:
The proper standard of review by the trial court depends upon the particular issues presented by the appeal. ACT-UP Triangle v. Commission for Health Services, 345 N.C. 699, 706, 483 S.E.2d 388, 392 (1997); Brooks v. McWhirter Grading Co., Inc., 303 N.C. 573, 580, 281 S.E.2d 24, 28 (1981). If appellant argues the agency’s decision was based on an error of law, then de novo review is required. In re McCrary, 112 N.C. App. 161, 165, 435 S.E.2d 359, 363 (1993) (citations omitted). If appellant questions whether the agency’s decision was supported by the evidence or whether it was arbitrary or. capricious, then the reviewing court must apply the whole record test.
Deep River Citizens’ Coalition v. NC Dep’t of Env’t and Natural Resources, 149 N.C. App. 211, 213-14, 560 S.E.2d 814, 816 (2002).
The reviewing court must determine whether the evidence is substantial to justify the agency’s decision. Gordon v. North Carolina Department of Correction, 173 N.C. App. 22, 34, 618 S.E.2d 280, 289 (2005). “A reviewing court may not substitute its judgment for the agency’s, even if a different conclusion may result under a whole record review.” Id.
*270As to appellate review of a superior court order regarding an agency decision, the appellate court examines the trial court’s order for error of law. The process has been described as a twofold task: (1) determining whether the trial court exercised the appropriate scope of review and, if appropriate, (2) deciding whether the court did so properly. As distinguished from the any competent evidence test and a de novo review, the whole record test gives a reviewing court the capability to determine whether an administrative decision has a rational basis in the evidence.
ACT-UP Triangle, 345 N.C. at 706-07, 483 S.E.2d at 392 (internal quotations omitted).
IV. Session Law
Petitioner argues the language of the settlement agreement provides petitioner with the unconditional right to develop the projects and the 2001 Session Law is inapplicable to their projects. Respondents argue that petitioner’s settlement projects are subject to the 2001 Session Law requiring a CON.
Our Supreme Court has stated, “if the meaning of the [agreement] is clear and only one reasonable interpretation exists, the courts must enforce the contract as written . . . .” Woods v. Insurance Co., 295 N.C. 500, 506, 246 S.E.2d 773, 777 (1978).
The settlement agreement provides:
Immediately upon entry of an order by the Superior Court of Wake County allowing the joint motion references in Paragraph 1 of this agreement, Carillon, and any of Carillon’s wholly-owned subsidiaries, shall be entitled to develop the assisted living facilities identified in Exhibit A to this agreement. The parties hereby agree that the moratorium is not applicable to development of the facilities described in Exhibit A.
The language of the settlement agreement is unambiguous. In exchange for the right to develop the settlement projects without obtaining an exemption, petitioner forfeited its right to litigate its remaining claims and constitutional challenges. DHHS previously had been granted full legislative authority to approve projects prior to the moratorium, which set limitations on that authority. To resolve a constitutional challenge to the moratorium, the parties agreed the moratorium did not operate to limit DHHS and the State’s authority with regards to certain of the projects at issue, thereby settling a question *271which otherwise would have to have been resolved by the courts. This settlement authority is precisely the legislative purpose of N.C. Gen. Stat. § 150B-22. Respondents properly exercised their statutory authorities to settle the case. N.C. Gen. Stat. § 150B-22 (2003) (“It is the policy of this State that any dispute between an agency and another person that involves the person’s rights, duties, or privileges, including licensing or the levy of a monetary penalty, should be settled through informal procedures.”).
The dissenting opinion argues that while respondents had authority to enter into settlement agreements pursuant to this statute, that authority is not without constitutional limitation. However, “appellate courts must ‘avoid constitutional questions, even if properly presented, where a case may be resolved on other grounds.’ ” James v. Bartlett, 359 N.C. 260, 266, 607 S.E.2d 638, 642 (2005) (quoting Anderson v. Assimos, 356 N.C. 415, 416, 572 S.E.2d 101, 102 (2002)); see also Union Carbide Corp. v. Davis, 253 N.C. 324, 327, 116 S.E.2d 792, 794 (1960) (“Courts must pass on constitutional questions when, but only when, they are squarely presented and necessary to the disposition of a matter then pending and at issue.”); State v. Blackwell, 246 N.C. 642, 644, 99 S.E.2d 867, 869 (1957) (“[A] constitutional question will not be passed on even when properly presented if there is also present some other ground upon which the case may be decided.”); State v. Muse, 219 N.C. 226, 227, 13 S.E.2d 229, 229 (1941) (an appellate court will not decide a constitutional question “unless it is properly presented, and will not decide such a question even then when the appeal may be properly determined on a question of less moment.”). Applying this principle, the present case can be resolved on purely statutory grounds. N.C. Gen. Stat. § 150B-22.
Additionally, the settlement agreement was executed by DHHS’s chief of the Adult Care Licensure Section and the State of North Carolina by the Special and Assistant Attorney Generals. The agreement specifically provides, “[t]he undersigned represent and warrant that they are authorized to enter into this agreement on behalf of the parties.” Both DHHS and the State of North Carolina consented to the settlement agreement. The Superior Court’s order in petitioner’s favor was vacated and the parties’ appeals were withdrawn. When “the Attorney General has control of the action [he] may settle it when he determines it is in the best interest of the State to do so.” Tice v. DOT, 67 N.C. App. 48, 51, 312 S.E.2d 241, 243 (1984).
The 2001 Session Law requires the exemption holder to provide evidence of: (a) the funding to cover the project’s capital costs by 1 *272June 2004; (b) the completion of building foundation and footings by 1 December 2004; and (c) the issuance of a certificate of occupancy by 1 December 2005. 2001 N.C. Sess. Laws 234.
The 2001 Session Law is inapplicable to the settlement or gap projects. The statutory exemptions apply only to the moratorium. The settlement agreement does not provide petitioner solely a statutory exemption to develop the settlement projects. Rather, the agreement expressly provides that petitioner “shall be entitled to develop” the settlement projects. The agreement also expressly provides, “[t]he parties hereby agree that the moratorium is not applicable to development of the facilities described in Exhibit A.” Because the exemptions apply only to the moratorium and the moratorium is expressly inapplicable to petitioner by the settlement agreement, petitioner is not bound by the 2001 Session Law. N.C. Gen. Stat. § 150B-22.
In light of our decision, it is unnecessary to reach petitioner’s constitutional claims.
V. Conclusion
Petitioner’s settlement projects are not subject to the 2001 Session Law. Id. The language of the settlement agreement expressly provides petitioner the right to develop the projects, not a right to an exemption, and was executed by parties with authority to bind DHHS and the State. The provisions of the moratorium and the 2001 Session Law are inapplicable to the gap projects. In light of our decision, it is unnecessary to reach petitioner’s constitutional claims. The trial court’s order is reversed and this cause is remanded for entry of judgment in favor of petitioner as provided in the settlement agreement.
Reversed and remanded.
Judge JOHN concurs. Judge JACKSON dissents.