Basically you' could start in a way similar to how a FPS camera works.
So, in the local space of the player, rotate around the up vector by horizontal mouse movement and around the side vector by vertical mouse movement.
However, this controls just the direction at which the straight sword points from the shoulder. There is no easy way to handle more detailed movements coming additionally from the wrist to control orientation of the sword from that point, because a mouse has only two axis. You would need something like a VR controller.
Or you work out a system that behaves natural and as intended most of the time. For this you need solid experience in solving geometric problems involving 3D rotations, a simple IK solver, some physics. You could look at a video of Kingdom Come Deliverance, and if you have no idea of how they might do this, then you won't get results good enough for a realistic game i guess. I'll end up being more kind of fun (like Fruit Ninja).