Can I rotate a line from a specific point in illustrator?

Hello,
I was wondering can I rotate a line from a specific point in illustrator, in a 2D manner/world/environment/flat way/on artboard? I have attached an example. In 3D I rotated the cube from a specific point, But I wanna do it in illustrator in a 2D manner, from one point to another,One point will be fixed(pivot) The other point I wanna rotate. Just curious can I do it?
Thank you.

