First of all - there are two kinds of motion; side to side (aka "rolling") and up and down as the ship rides perpendicular to the swells and rises up waves and goes over them. That is called "pitching".
Normally, any ship will trying to sail into the waves rather than letting them hit the ship from the side. Plus, they can manage rolling with stabilizers, but they can't stop pitching.
Therefore, the distance you are between the two sides of the ship is not really relevent - has no different effect. You will feel roughly the same rolling movement in an inside cabin as you will in an outside cabin. For rolling, the only difference is how far up on the ship you are (lower cabins are better).
But what matters a lot more is how close you are to the front (most wave motion) or the back (second most). You feel the pitching the most when you are towards the front of a ship, and not quite as much when you are at the rear of a ship. You feel pitching the least in the middle of the ship.
So the absolute best spot is in the (1) middle (between front & rear) and (2) lower (between lower and higher decks) area of the ship, but the first is more important then the latter.