i bet 9 preflop, 3/4 pot on the flop, 3/4 pot on the turn, and I call the river bet.
There's very little value in raising the river, cuz I doubt anything but a flush is calling all in.
There's no way you are getting away from your hand, but you could have avoided getting stacked by just calling here (obv).
However, had you bet harder on the flop and turn, the pot may have got so big that he might have pushed the river and you'd have still gotten stacked.