How to merge multiple custom field context for a field

Hi I was trying to merge the multiple custom field context for a field A. Is there any easy way to do this. Field A is a single select and having 3 contexts for different projects, now we want to make that into a single context with all projects and values. How can we merge this using script? Also, we have 1000+ number of already created issues so how we can update those issues. Any way to achieve this?