Whether you can be compelled to lie under these circumstances or not is not a resolved question of law. Although it seems fairly likely that compelling speech in this way is unconstitutional, if it has been tested in court, the proceedings are not public.