How can I allow user to select minimum privilege smartly

You are using the right WP function but unfortunately not passing the right parameter to make this work for you.

current_user_can() accepts capabilities as well as roles as parameters.

In the above you are using roles and not capabilities.

You can use capabilities to make it work.

For example, if you want the minimum privilege role is author your code would look like

if ( current_user_can( 'edit_published_posts' ) ) {
  //do this
}

This will allow all the roles including author to have the privilege and would stop users with roles contributor and subscriber from the access.

You can read the details of roles and capabilities from the codex here.