Is there a way to "pin" selected rows in a table?

I'm trying to allow users to search for and select rows from a table.
Is there a way to "pin" selected rows so the user can see the selected rows while they scroll/page?
screenshot for reference