NEW YORK — There was something Eric Chavez didn’t like about those 13 years in Oakland. Being held accountable for every win and loss did not appeal to him anymore, which is why a move to the Yankees this offseason made sense.

“When I made the decision to come here, I knew how it was going to be,” Chavez said of his role in New York. “People talk about change of scenery, whatever that means. But the last few years hadn’t been working.

“I needed to change things up, and it’s been working out so far.”

And despite doing his best to shove the spotlight away, it was inevitably on him tonight as his line-drive single in the eighth inning skidded into center field, and Mark Teixeira slid into home with what would be the winning run in the Yankees’ 6-5 victory in the rubber game against the Rangers.

On a rain-soaked, chilly evening when Alex Rodriguez sat out — receiving an MRI today on his sore rib cage — Chavez stepped in like the player they demanded him to be in Oakland all those years. He finished 2-for-4 with a run scored and an RBI; his batting average is now at .467.

“I really like (my role) a lot,” Chavez said. “I really didn’t like having that title (in Oakland) anyway, you know. I just like to get my work in, and when (manager) Joe (Girardi) puts me in, I just try and do my best. I don’t have to worry about all that other stuff.”

The 40,811 in attendance tonight saw a little bit of everything on the field and with the weather. The Yankees (9-5) did not get a typical performance from CC Sabathia (6⅓ innings, eight hits, four earned runs) but managed to stay afloat on the strength of home runs from Robinson Cano, Curtis Granderson and Russell Martin.

And despite a bevy of offense — 10 total hits — from Texas (10-5), the Yankees were able to settle down in more typical fashion, getting a scoreless eighth from Rafael Soriano (1-0) that set up Mariano Rivera’s seventh save.

But the early innings didn’t foreshadow anything like that.

Rangers third basemen Adrian Beltre took a stranglehold on the game and pounded Sabathia every chance he got. Despite being just 3-for-22 lifetime against Sabathia heading into tonight’s game, he went 3-for-4 with four RBI, including a two-run home run in the first inning off the Yankees ace to give the Rangers an early lead.

“It was the two-strike hitting,” Sabathia said of Beltre. “Everything was on two strikes and he’s just a great hitter.”

Every dig Beltre made into the Yankees lead was quickly combated. Cano pulled a home run to right in the second, then Martin went left in the fifth inning, tying the score at three. The Rangers would pull ahead again, only to have the score tied when Granderson connected with a fastball to send the momentum back the Yankees’ way in the sixth.

All this set up Chavez in the bottom of the eighth. After working the count on a weary Arthur Rhodes, he pounced on a two-strike fastball back up the middle, the decisive swing in a game defined by its ebbs and flows.

“I thought he was going to play an important role for us this year,” Girardi said of Chavez. “Big RBI at the end of the game; he’s been outstanding.”

NOTE: Brett Gardner, who has been working extra with hitting coach Kevin Long, did not fare any better tonight, going 0-for-2 from the plate with a strikeout.

He was later subbed out for Andruw Jones.

Girardi had hoped that batting him No. 9 — where he played a majority of last season — would help alleviate some of the pressure he’d been feeling in the leadoff spot.

Gardner said that it’s simply a mechanical issue with his swing, that he’s not using enough of his lower half to drive the baseball.