How to remove the action button from actions column in the table

How can we dynamically display action buttons in the table's actions column ? Like for few rows I need to show the button and need to hide the button in few rows?